<%@page import="org.amj.wn.jamaat.Jamaat.JamaatProperty"%>
<%@page import="org.amj.wn.jamaat.Jamaat"%>
<%@page import="com.google.appengine.api.datastore.Entity"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>New Entry</title>
<link type="text/css" rel="stylesheet" href="/stylesheets/main.css" />
</head>
<body>

<jsp:include page="admincommon.jsp"></jsp:include>
			<%
			List<Entity> result = Jamaat.search(0, 1000);
			if(result.size() == 0) {
				%>
				<div class="error">Please create a jamaat entry first.</div>
				<%} %>
<form method="post" action="/admin/AdminServiceOperations">

	<h3>Create/Update Entry</h3>
	<label>
		<span>Member Code</span> 
		<input name='memberCode' class='input_text' type='text' /> 
	</label>
	<label>
		<span>Passcode</span> 
		<input name='passCode' class='input_text' type='text' /> 
	</label>
	<label>
		<span>Jamaat</span> 
		<select name='jamaatCode' class='input_select'>
			<%
			for(Entity ent : result) {
			%>
				<option value="<%=ent.getProperty(JamaatProperty.jamaatCode.name())%>"><%=ent.getProperty(JamaatProperty.name.name()) %></option>
				
			<%} %>
		</select>
	</label>
	
	
	
	
	
	<input name='opt' class='input_text' type='hidden' value='CREATE'/>
	<input type='submit' value='Update' class="input_button"/>
</form>
	
</body>
</html>